package com.linghang.dao;

import com.linghang.pojo.Student;
import com.linghang.pojo.Teacher;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TeacherMapper {
      @Select("SELECT s.id sid,s.name sname,t.name tname\n" +
              "        FROM student s ,teacher t \n" +
              "        WHERE s.tid = t.id AND t.id=#{tid};")
       Teacher getTeacher(@Param("tid") int id);

    //获取制定学生下的所有学生及老师的信息
    Teacher getTeacher2(@Param("tid") int id);
}
